package com.turing.post.report.util;

import java.math.BigInteger;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;

/**
 * 文件资料表（BinaryFileInfo）
 * 
 * @author zxp
 * @Jan 25, 2013
 */
@Remote
@Local
public interface BinaryFileInfoDao {

	/**
	 * 获取唯一的整数类主键
	 * 
	 * @return
	 */
	public BigInteger getUniqueBinaryFileKey();

	/**
	 * 根据主键查询
	 * 
	 * @return
	 */
	public BinaryFileInfo getBinaryFileInfoById(BigInteger id);

	/**
	 * 新增
	 * 
	 */
	public void insertBinaryFileInfo(BinaryFileInfo binaryFileInfo)
			throws PCPSApplicationException;

	/**
	 * 修改
	 * 
	 * @param binaryFileInfo
	 * @throws PCPSApplicationException
	 */
	public void updateBinaryFileInfo(BinaryFileInfo binaryFileInfo)
			throws PCPSApplicationException;

	/**
	 * 删除文件
	 * 
	 */
	public void deleteBinaryFileInfoById(BigInteger id)
			throws PCPSApplicationException;

	/**
	 * 新增或创建图片信息
	 * 
	 * @param image
	 * @param oldImageId
	 *            原图片编号
	 * @return
	 * @throws PCPSAppllicationException
	 */
	public BigInteger insertOrUpdateBinaryFile(byte[] image,
			BigInteger oldImageId,String fileType) throws PCPSApplicationException;
	/**
	 * 新增或创建图片信息--风险
	 * 
	 * @param image
	 * @param oldImageId
	 *            原图片编号
	 * @return
	 * @throws PCPSAppllicationException
	 */
	public void insertXmlFile(BinaryFileInfo binaryFileInfo) throws PCPSApplicationException;
}
